package com.qinyu.treehole.bo;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class LoginUserBo {
    @NotNull
    @Pattern(regexp = "^[\\u4E00-\\u9FFFa-zA-Z]{1}[\\u4E00-\\u9FFFa-zA-Z0-9]{2,15}$"
            , message = "用户名不合法！用户名应该不以数字开头，包含汉字或者大小写字母，长度在3-16！")
    private String name;
    @NotNull
    @Pattern(regexp = "^[\\$@!%*#~?&0-9a-zA-Z]{6,18}$",message = "密码不合法！密码应只包含大小写字母数字和特殊字符，长度在6-18！")
    private String password;
}
